package com.kovalko;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by 4uvak on 22.06.2014.
 */
public class Horoskop {

    public static void main(String[] arg)
    {
        Map<String,String> horoskopMap = new HashMap<String,String>();
        horoskopMap.put("Oven", "Ok Oven");
        horoskopMap.put("Lev", "Ok Lev");
        horoskopMap.put("Strelec", "Ok Strelec");
        horoskopMap.put("Telec", "Ok Telec");
        horoskopMap.put("Ribi", "Ok Ribi");
        horoskopMap.put("Vodolei", "Ok Vodolei");
        horoskopMap.put("Kozerog", "Ok Kozerog");
        horoskopMap.put("Rak", "Ok Rak");
        horoskopMap.put("Devi", "Ok Devi");
        horoskopMap.put("Skorpion", "Ok Skorpion");
        horoskopMap.put("Vesi", "Ok Vesi");
        horoskopMap.put("Blizneci", "Ok Blizneci");

        try {
            String sign = "Vodole";
            String predict = horoskopMap.get(sign);
            if (predict == null) {
                throw new IllegalArgumentException("There is no such sign in the zodiac: " + sign);
            }
            System.out.println("Vash horoskop: " + predict);
        } catch (IllegalArgumentException e) {
            System.out.println("Exception occurred: " + e.getMessage());
        } finally {
            System.out.println("FINALLY!!!");
        }
    }
}
